package com.ruoyi.bussiness.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.OwnerStockMonitorMapper;
import com.ruoyi.bussiness.domain.OwnerStockMonitor;
import com.ruoyi.bussiness.service.IOwnerStockMonitorService;

/**
 * 股票监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-29
 */
@Service
public class OwnerStockMonitorServiceImpl implements IOwnerStockMonitorService 
{
    @Autowired
    private OwnerStockMonitorMapper ownerStockMonitorMapper;

    /**
     * 查询股票监控
     * 
     * @param id 股票监控主键
     * @return 股票监控
     */
    @Override
    public OwnerStockMonitor selectOwnerStockMonitorById(Long id)
    {
        return ownerStockMonitorMapper.selectOwnerStockMonitorById(id);
    }

    /**
     * 查询股票监控列表
     * 
     * @param ownerStockMonitor 股票监控
     * @return 股票监控
     */
    @Override
    public List<OwnerStockMonitor> selectOwnerStockMonitorList(OwnerStockMonitor ownerStockMonitor)
    {
        return ownerStockMonitorMapper.selectOwnerStockMonitorList(ownerStockMonitor);
    }

    /**
     * 新增股票监控
     * 
     * @param ownerStockMonitor 股票监控
     * @return 结果
     */
    @Override
    public int insertOwnerStockMonitor(OwnerStockMonitor ownerStockMonitor)
    {
        return ownerStockMonitorMapper.insertOwnerStockMonitor(ownerStockMonitor);
    }

    /**
     * 修改股票监控
     * 
     * @param ownerStockMonitor 股票监控
     * @return 结果
     */
    @Override
    public int updateOwnerStockMonitor(OwnerStockMonitor ownerStockMonitor)
    {
        ownerStockMonitor.setUpdateTime(DateUtils.getNowDate());
        return ownerStockMonitorMapper.updateOwnerStockMonitor(ownerStockMonitor);
    }

    /**
     * 批量删除股票监控
     * 
     * @param ids 需要删除的股票监控主键
     * @return 结果
     */
    @Override
    public int deleteOwnerStockMonitorByIds(Long[] ids)
    {
        return ownerStockMonitorMapper.deleteOwnerStockMonitorByIds(ids);
    }

    /**
     * 删除股票监控信息
     * 
     * @param id 股票监控主键
     * @return 结果
     */
    @Override
    public int deleteOwnerStockMonitorById(Long id)
    {
        return ownerStockMonitorMapper.deleteOwnerStockMonitorById(id);
    }
}
